//
//  Macro.h
//  Dear
//
//  Created by 陈俊俊 on 15/7/11.
//  Copyright (c) 2015年 陈俊俊. All rights reserved.
//
//基本的宏定义
#ifndef Dear_Macro_h
#define Dear_Macro_h

//获取版本号
#define kVersionKey      [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey]

//获取delegate
#define DearAppDelegate [UIApplication sharedApplication].delegate

#define DearApplication [UIApplication sharedApplication]

//获取沙河路径
#define DocumentPath     [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0]

//屏幕的大小
#define ScreenSize ([[UIScreen mainScreen] bounds].size)

//是否是IOS7
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)


//当前设备的操作系统版本
#define DeviceVersion [[UIDevice currentDevice].systemVersion floatValue]
#define UUIDStr  [UIDevice currentDevice].identifierForVendor.UUIDString

//屏幕适配
#define WidthScale ScreenSize.width/320

#define HeightScale (ScreenSize.height-64)/(568-64)


//配置RGB颜色
#define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:A]
#define HexColor(colorStr)  [UIColor colorWithHexString:colorStr]
#define FontSize(num) [UIFont systemFontOfSize:num]
#define ImageName(name) [UIImage imageNamed:name]
#define KeyBoard 216
#define HeadImage @"headImage"
#define DearAndMeImage @"dearImage"
#define SameColor HexColor(@"00c45c")
#define SexUpdateTime @"sexUpdateTime"
#define InfoUpdateTime @"infoUpdateTime"

//特殊字符串
#define LocationInformation @"locationInformation"
#define ShowMessage(msg) [[[UIAlertView alloc] initWithTitle:@"温馨提示" message:msg delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil] show]
#endif
